For your luck, you solved it simply by switching from DInput to XInput mode. However, there may be cases where this workaround can't be used. This link may have a fully working solution: https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=36564&sid=cc03fff216d25ee04264771b9e3bd0bc&start=25

In summary, some USB adapters / controllers, such as this one, have issues on various Linux distros. A problem on HID Input drivers prevents D-Pad to work properly. Down and Right works, but no Up and Left.

To solve this problem, you'll need to recompile Linux kernel on your RPI after making a few changes on "hid-input.c" file, which is located in "/drivers/hid/hid-input.c" (Within the source code directory). You can find all instructions on link above.

Alternatively, you can try a few compiled kernels made by the same guys who found this solution. But you'll need to make sure the kernel was compiled exactly for your linux version, or else, you may have problems (I got no sound problem two years ago, when I tried those kernels).

This kernel bug is here since 2010, and it affects Linux on desktop too (got it on Ubuntu 14.04 and 16.04, per example). Until now, it wasn't fixed by developers. So, the only way to get it working is by compiling kernel from scratch.